<admintpl file="header" />
<style>
	*{margin:0; padding:0;}
	body{font-family: "Microsoft Yahei", "hiragino sans gb", Helvetica, Arial, Tahoma;}
	.shdo{position: fixed; left:0; top:0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 10; display: none;}
	.stan-box{padding:10px 20px; width: 400px; max-height: 500px; background: #fff; position: fixed; left:100px; top:100px; z-index: 11; display: none;}
	.simgBox{max-height: 440px; overflow: auto; text-align: center;}
	.simgBox img{}
	.stit{height: 30px;}
	.stit .yuan{font-size: 14px;}
	.stit .cuo{display: block; width: 20px; height: 20px; color: #fff; background: #007aff; line-height: 20px; text-align: center; position: absolute; right:0; top:0; cursor: pointer;}
	.sbot{height: 30px; }
	.sbot span{height: 26px; line-height: 26px; width: 50px; font-size: 12px; color: #fff;  background: #007aff;  float: right; text-align: center; border-radius: 2px;margin-top: 6px; cursor: pointer;}
	.tanimg{cursor:pointer;}
</style>
</head>
<body>
<div class="wrap">
	<ul class="nav nav-tabs">
		<li class="active"><a>投注管理</a></li>
	</ul>
	<form class="well form-search" method="post" action="{:U('Betting/index')}">
      会员账号：
        <input type="text" name="accounts" style="width: 220px;" value="{$accounts}" placeholder="请输入会员账号">

	彩种：
					<select name="caizhong" style="width:150px;">
						<option value="0">全部彩票</option>
						<foreach name="classs " item="v">
	                       <option value="{$v.id}" <?php if($caizhong==$v["id"]){echo "selected";};?>>{$v.name}</option>
	                    </foreach>
					</select>&nbsp;&nbsp;
        时间:
        <input type="text" name="kaishi" id="test1" class="js-datetime" style="width: 150px" value="{$kaishi}">&nbsp;至&nbsp;
        <input type="text" name="jieshu" id="test2" class="js-datetime" style="width: 150px" value="{$jieshu}">
	类型：
					<select name="leixing">
					<option value="0">全部</option>
					<option value="1" <?php if($leixing==1){echo "selected";}?>>已中奖</option>
					<option value="2" <?php if($leixing==2){echo "selected";}?>>未中奖</option>
					<option value="3" <?php if($leixing==3){echo "selected";}?>>等待开奖</option>
					</foreach>	
					</select>
					<input type="submit" class="btn btn-primary" value="搜索" />
					<a class="btn btn-danger" href="{:U('Betting/index')}">清空</a>
	</form>
	<form method="post" class="js-ajax-form">
		<table class="table table-hover table-bordered">
			<thead>
			<tr>
                <th width="80">会员名称</th>
				<th width="80">彩种</th>
                <th width="100">期号</th>
                <th width="150">投注内容</th>
                <th width="60">投注金额</th>
                <th>开奖号码</th>
                <th width="50">奖金状态</th>
                <th width="150">投注时间</th>
                <th width="50">操作项</th>
			</tr>
			</thead>
			<tbody>
			<php>if(!empty($arr)):</php>
			<foreach name="arr" item="v">
                            <tr>
                                <td style="color: rgb(74, 169, 219);">{$v.mingzi}</td>
                                <td style="color: rgb(74, 169, 219);">{$v.classname}</td>
                                <td>{$v.issue}</td>
                                <td>
                                    <div class="betNum"  data-qzhu="<?php if($v['table']=='1'){echo $a1[$v['id']];}
                                    elseif($v['table']=='2'){echo $a2[$v['id']];}
                                    elseif($v['table']=='3'){echo $a3[$v['id']];}
                                    elseif($v['table']=='4'){echo $a4[$v['id']];}
                                    elseif($v['table']=='5'){echo $a5[$v['id']];}
                                    elseif($v['table']=='6'){echo $a6[$v['id']];}
                                    ;?>">
                                        <?php if($v["table"]=='1'){echo $a1[$v['id']];}
                                        elseif($v["table"]=='2'){echo $a2[$v['id']];}
                                        elseif($v["table"]=='3'){echo $a3[$v['id']];}
                                        elseif($v["table"]=='4'){echo $a4[$v['id']];}
                                        elseif($v["table"]=='5'){echo $a5[$v['id']];}
                                        elseif($v["table"]=='6'){echo $a6[$v['id']];}
                                        ;?>
                                    </div>
                                    <a class="NumLink" style="color: rgb(74, 169, 187); display: none;">[详情]</a>
                                </td>
                                <td>{$v.money}</td>
                                <td>
                                    <div class="betNum" data-qzhu="{$v.opencode}">{$v.opencode}</div>
                                </td>
                                <td style="color: rgb(228, 57, 60);">
                                    <?php 
                                    if($v['status']=='1'){
                                        echo "已撤单";
                                    }else{
                                        if(trim($v["opencode"])==''){echo "等待开奖";}
                                                  elseif($v["zong_money"] > 0 && $v["opencode"]!=''){echo $v["zong_money"];}
                                        elseif($v["zong_money"] == 0 && $v["opencode"]!=''){echo "未中奖";} ;
                                    }
                                    ?>
                                </td>

                                <td><?php echo date("Y-m-d H:i:s",$v["ctime"]);?></td>
                                <td>
                                    <a  href="{:U('Betting/betDetail',array('lotteryclass'=>$v['lotteryclass'],'table'=>$v['table'],'id'=>$v['id']))}">查看</a>
                                    <?php if($v['status']!='1' && trim($v["opencode"])==''){ ?>
                                        <a  href="{:U('Betting/che_order',array('p'=>$p,'table'=>$v['table'],'id'=>$v['id']))}">撤单</a>
                                    <?php }?>
                                </td>
                            </tr>
                        </foreach>
			<php>else:</php>
			<tr>
				<td style="text-align: center;" colspan="10">未搜索到相关数据</td>
			</tr>
			<php>endif;</php>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</form>
<script src="__PUBLIC__/js/common.js"></script>
<script src="/style/js/fx.js"></script>
<script>
$(function(){
        personalInfo();
        $(".userSearch").click(function (){
            $(this).addClass("active").siblings(".userSearch").removeClass("active");
            var dat = $(this).data("value");
        });

        $(".betNum").each(function(){
            var str = $(this).text();
            if(str.length>7){
                $(this).siblings(".NumLink").addClass("on");
            }
        });
        $(".NumLink").click(function(){
            var txt = $(this).prev().data("qzhu");
            $("#layermbox7 .layermcont").text(txt);
            $("#layermbox7").show();
        });

        var txt = $(this).find("option:selected").text();
        $(".fx_c_name").text(txt);
        $(".userSelect").change(function(){
            var val = $(this).val();
            var txt = $(this).find("option:selected").text();
            $(".fx_c_name").text(txt);
        })
    });
</script>
</body>
</html>